home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / Text::Wrap.Z / Text::Wrap
Encoding:
Text File  |  1998-10-28  |  2.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      TTTTeeeexxxxtttt::::::::WWWWrrrraaaapppp((((3333))))   22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))     TTTTeeeexxxxtttt::::::::WWWWrrrraaaapppp((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       Text::Wrap - line wrapping to    form simple paragraphs
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           use Text::Wrap
  13.  
  14.           print    wrap($initial_tab, $subsequent_tab, @text);
  15.  
  16.           use Text::Wrap qw(wrap $columns $tabstop fill);
  17.  
  18.           $columns = 132;
  19.           $tabstop = 4;
  20.  
  21.           print    fill($initial_tab, $subsequent_tab, @text);
  22.           print    fill("", "", `cat book`);
  23.  
  24.  
  25.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  26.       _T_e_x_t::_W_r_a_p::_w_r_a_p() is    a very simple paragraph    formatter.  It
  27.       formats a single paragraph at    a time by breaking lines at
  28.       word boundries.  Indentation is controlled for the first
  29.       line ($initial_tab) and all subsquent    lines
  30.       ($subsequent_tab) independently.  $Text::Wrap::columns
  31.       should be set    to the full width of your output device.
  32.  
  33.       _T_e_x_t::_W_r_a_p::_f_i_l_l() is    a simple multi-paragraph formatter.
  34.       It formats each paragraph separately and then    joins them
  35.       together when    it's done.  It will destory any    whitespace in
  36.       the original text.  It breaks    text into paragraphs by
  37.       looking for whitespace after a newline.  In other respects
  38.       it acts like _w_r_a_p().
  39.  
  40.      EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  41.           print    wrap("\t","","This is a    bit of text that forms
  42.               a normal book-style paragraph");
  43.  
  44.  
  45.      BBBBUUUUGGGGSSSS
  46.       It's not clear what the correct behavior should be when
  47.       _W_r_a_p() is presented with a word that is longer than a    line.
  48.       The previous behavior    was to die.  Now the word is now split
  49.       at line-length.
  50.  
  51.      AAAAUUUUTTTTHHHHOOOORRRR
  52.       David    Muir Sharnoff <muir@idiom.com> with help from Tim
  53.       Pierce and others. Updated by    Jacqui Caren.
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      TTTTeeeexxxxtttt::::::::WWWWrrrraaaapppp((((3333))))   22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))     TTTTeeeexxxxtttt::::::::WWWWrrrraaaapppp((((3333))))
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.      Page 2                        (printed 10/23/98)
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.